// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-15

package info

import (
	"server/app/http/models"
	"server/app/kind"
)

type (
	// Response
	// 出参.
	Response struct {
		Id          int64
		Enabled     kind.Enabled
		EnabledFlag string
		EnabledText string
		Kind        kind.PondKind
		KindText    string
		Name        string
		Area        float64
		Depth       float64
		Seat        kind.PondSeat
		SeatText    string
		SeatCount   int
	}
)

func NewResponse() *Response {
	return &Response{}
}

func (o *Response) With(m *models.ArcadePond) *Response {
	o.Id = m.Id
	o.Enabled = m.Enabled
	o.EnabledFlag = m.Enabled.Flag()
	o.EnabledText = m.Enabled.Text()
	o.Kind = m.Kind
	o.KindText = m.Kind.Text()
	o.Name = m.Name
	o.Area = m.Area
	o.Depth = m.Depth
	o.Seat = m.Seat
	o.SeatText = m.Seat.Text()
	o.SeatCount = m.SeatCount
	return o
}
